name: "Setup minikube environment"
description: "Setup minikube environment with different runtimes"

inputs:
  runtime:
    description: "The container runtime to use for minikube."
    required: true
  multi-node:
    description: "Whether to run minikube with multiple nodes."
    required: false
    default: false

runs:
  using: "composite"
  steps:
    - name: Start minikube
      shell: bash
      run: |
        make minikube-start-${{ inputs.runtime }}
      env:
        # When using multi-node, run the integration tests on two nodes.
        # As GitHub Runner has only 2 CPU and 7 GB of DRAM, we cannot use a big
        # number here
        MINIKUBE_PARAMS: ${{ inputs.multi-node == 'true' && '-n 2' || '' }}

